package com.ydy.threadpool.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ydy.service.order.OrderService;

public class OrderCloseTask implements Runnable {

	private final static Logger log = LoggerFactory.getLogger(OrderCloseTask.class);
	private Long orderId;
	private OrderService orderService;

	public OrderCloseTask(Long orderId, OrderService orderService) {
		this.orderId = orderId;
		this.orderService = orderService;
	}

	@Override
	public void run() {
		if (this.orderId == null)
			return;
		try {
			orderService.updateOrderStatusClose(orderId, null);
		} catch (Exception e) {
			log.info("订单关闭异常:{}", e.getMessage());
		}
	}

}
